//
//  NSCalendar+BKODCalendarExtensions.h
//  CanlendarTest
//
//  Created by yons on 17/2/14.
//  Copyright © 2017年 马乾征. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSCalendar (BKODCalendarExtensions)
/**
    当月第一天
 */
- (NSDate *)od_firstDayOfMonth:(NSDate *)month;
/**
    当月最后一天
 */
- (NSDate *)od_lastDayOfMonth:(NSDate *)month;
/**
    当月天数
 */
- (NSInteger)od_numberOfDaysInMonth:(NSDate *)month;
/**
    当天日期信息
 */
- (NSDateComponents *)od_dateComponents:(NSDate *)date;
/**
    两个日期之间天数
 */
- (NSInteger)od_numberOfDaysFromDate:(NSDate *)startDate toDate:(NSDate *)endDate;

/**
    两个日期之间的月份
 */
- (NSInteger)od_numberOfMonthFromMonth:(NSDate *)startMonth toMonth:(NSDate *)endMonth;
/**
    当前日相差多少天的日期(日期总在当前月内)
 */
- (NSDate *)od_dateWithDifferenceDays:(NSInteger)days atDate:(NSDate *)date;
/**
    当前日相差多少月的日期
 */
- (NSDate *)od_dateWithDifferenceMonth:(NSInteger)month atDate:(NSDate *)date;
@end
